package com.university.evaluation.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.university.evaluation.entity.Appeal;

import java.util.List;
import java.util.Map;

public interface AppealService extends IService<Appeal> {

    // 根据学生ID查询申诉记录
    List<Appeal> findByStudentId(Long studentId);

    // 根据状态查询申诉记录
    List<Appeal> findByStatus(String status);

    // 根据成绩明细ID查询申诉记录
    Appeal findByScoreDetailId(Long scoreDetailId);

    // 提交申诉
    Appeal submitAppeal(Appeal appeal);

    // 处理申诉
    boolean processAppeal(Long appealId, String status, String remark, Double newScore);

    // 查询待处理的申诉数量
    Long countPendingAppeals();

    // 分页查询申诉记录
    Map<String, Object> findByPage(Integer page, Integer pageSize, String status, Long studentId);

}